﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SqlCe4Mvc3Application1.Models
{
    public partial class _Containers_CustomPropertiesPartRecord : RaisingStudio.Data.Expressions.TableExpression, RaisingStudio.Data.Expressions.IQueryExpression<_Containers_CustomPropertiesPartRecord>
    {
        #region Constructor (s) / Destructor
        /// <summary>
        /// Constructor (s) / Destructor.
        /// </summary>
        public _Containers_CustomPropertiesPartRecord() : base("Containers_CustomPropertiesPartRecord")
        {
        }
        #endregion
        #region Members
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Id = "Id";
        public RaisingStudio.Data.Expressions.ColumnExpression Id { get { return _Id; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _CustomOne = "CustomOne";
        public RaisingStudio.Data.Expressions.ColumnExpression CustomOne { get { return _CustomOne; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _CustomTwo = "CustomTwo";
        public RaisingStudio.Data.Expressions.ColumnExpression CustomTwo { get { return _CustomTwo; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _CustomThree = "CustomThree";
        public RaisingStudio.Data.Expressions.ColumnExpression CustomThree { get { return _CustomThree; } }

		#endregion

        public static implicit operator RaisingStudio.Data.Expressions.ConditionExpression(_Containers_CustomPropertiesPartRecord Containers_CustomPropertiesPartRecord)
        {
            return new RaisingStudio.Data.Expressions.ConditionExpression();
        }

        public RaisingStudio.Data.Expressions.ConditionExpression OrderBy(RaisingStudio.Data.Expressions.ColumnExpression columnExpression)
        {
             RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
             return conditionExpression.OrderBy(columnExpression);
        }

        public RaisingStudio.Data.Expressions.ConditionExpression OrderBy(RaisingStudio.Data.Expressions.ColumnExpression columnExpression, RaisingStudio.Data.Expressions.SortingDirection sortingDirection)
        {
            RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
            return conditionExpression.OrderBy(columnExpression, sortingDirection);
        }

        public RaisingStudio.Data.Expressions.ConditionExpression Where(RaisingStudio.Data.Expressions.ExpressionElement expressionElement)
        {
            RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
            return conditionExpression.Where(expressionElement);
        }

        public static implicit operator RaisingStudio.Data.Expressions.ColumnExpressionCollection(_Containers_CustomPropertiesPartRecord Containers_CustomPropertiesPartRecord)
        {
            return new RaisingStudio.Data.Expressions.ColumnExpressionCollection(Containers_CustomPropertiesPartRecord);
        }

        public static implicit operator RaisingStudio.Data.Expressions.ColumnExpression[](_Containers_CustomPropertiesPartRecord Containers_CustomPropertiesPartRecord)
        {
            return new RaisingStudio.Data.Expressions.ColumnExpression[]
                        {                            
                            Containers_CustomPropertiesPartRecord.Id,
                            Containers_CustomPropertiesPartRecord.CustomOne,
                            Containers_CustomPropertiesPartRecord.CustomTwo,
                            Containers_CustomPropertiesPartRecord.CustomThree,
                        };
        }

        public RaisingStudio.Data.Expressions.ColumnExpressionCollection Except(params RaisingStudio.Data.Expressions.ColumnExpression[] columns)
        {
            RaisingStudio.Data.Expressions.ColumnExpressionCollection columnExpressionCollection = this;
            return columnExpressionCollection.Except(columns);
        }

    
        public static implicit operator RaisingStudio.Data.Expressions.QueryExpression<_Containers_CustomPropertiesPartRecord>(_Containers_CustomPropertiesPartRecord Containers_CustomPropertiesPartRecord)
        {
            return new RaisingStudio.Data.Expressions.QueryExpression<_Containers_CustomPropertiesPartRecord>(Containers_CustomPropertiesPartRecord);
        }


        #region IQueryExpression<_Containers_CustomPropertiesPartRecord> 成员

        _Containers_CustomPropertiesPartRecord RaisingStudio.Data.Expressions.IQueryExpression<_Containers_CustomPropertiesPartRecord>.Value
        {
            get { return Containers_CustomPropertiesPartRecord._; }
        }

        #endregion

        #region IQueryExpression 成员

        RaisingStudio.Data.Expressions.TableExpression RaisingStudio.Data.Expressions.IQueryExpression.Table
        {
            get { return this; }
        }

        RaisingStudio.Data.Expressions.ConditionExpression RaisingStudio.Data.Expressions.IQueryExpression.Condition
        {
            get { return this; }
        }

        RaisingStudio.Data.Expressions.ColumnExpressionCollection RaisingStudio.Data.Expressions.IQueryExpression.Columns
        {
            get { return null; }
        }

        #endregion
    }

    partial class Containers_CustomPropertiesPartRecord
    {
        #region Members
        public static readonly _Containers_CustomPropertiesPartRecord _ = new _Containers_CustomPropertiesPartRecord();
		#endregion
    }
}
